1. Field of the Invention
The present invention relates to a self-adapting method and device for the inlaying of colour video images.
2. Description of the Related Art
The inlaying of colour video images consists in extracting, from a source image, a subject, such as a person or an object, moving in front of a uniform colour background in order to place it in front of a new background.
It is known to define the uniform colour background in the plane C.sub.R C.sub.B (with C.sub.R =R-Y, C.sub.B =B-Y, where B, R, Y represent the blue colour signal, the red colour signal and the luminance respectively) by a closed area constituted by a quadrilateral. During the analysis of the source image, line by line and point by point, a point is considered as belonging to the background if its components C.sub.R and C.sub.B are inside the quadrilateral; it is considered as belonging to the section to be inlaid in the opposite case. Thus, with each line of the source image there corresponds a "key" or switching signal which, for example, has the value 1 for the part to be inlaid and the value 0 for the background, or vice-versa. However, this "key" signal does not allow a realistic rendering of the inlaid image, as the background/subject transitions are very sharp and the contours of the inlaid subject are jagged. An improvement in the rendering of the inlaid image is obtained by smoothing the background/subject transition in order to mask the jagged contours by introducing a gain function in the dividing key signal. But in this case, it is not possible to reproduce fine details, nor transparency, nor shadows, and an edge of the same colour as that of the background (generally blue) is apparent on the contour of the subject.
Another method of inlaying images is disclosed in the French patent No. 79 20820 lodged in the name of the Applicant. It consists in carrying out a linear division of the subject to be inlaid using a channel with a high fixed gain allowing the provision of a clean division for the sections of the image having no colorimetric ambiguity, and a variable gain channel allowing both the restoration of a transparency effect and the creation of a fade following the fine details around the subject. The shadow effect is obtained by detecting the low luminance levels and by causing the corresponding attenuation of the new background. However, although the shadow effect is well rendered, the fine details are attenuated and the transparency exhibits a colouring of the former background. Furthermore, for slow transitions, the presence of an edge of the same colour as the background, that is to say bluish, is still present.
Another method of inlaying images, in principle different from that of linear mixers, allows the inlaying of a red, green, blue (R, G, B) source image for a subject moving in front of a very pure blue, green (and possibly red) background. The method consists firstly in eliminating the background colour in the source image by subtraction, allowing the subject to remain as though it were placed in front of a black background. The new background is then introduced into the source image, in the zone previously occupied by the coloured background, in proportion to the luminosity and the visibility of the latter. The transparencies or semi-transparencies such as glass, smoke or fog, are therefore entirely retained. As the source image is never switched, the fine details are also fully reproduced in the inlaid image. A blue (green or red respectively) locking module allows the elimination of reflections of the coloured background on the subject in the inlaid image. Besides the fact that this method necessitates a very large number of adjustments in order to obtain a quality inlaid image, a uniform and pure background is necessary. Any non-uniformity of the background is reproduced in the inlaid image thus polluting the new background. Although it is possible to avoid this pollution of the new background by using a continuous and instantaneous zeroing of the coloured background of the source image, it is then no longer possible to reproduce transparency and shadow. Furthermore, the elimination of reflections of the background on the subject gives rise, depending on the colour of the background used, to degradations in certain colours (for example magenta is the background is blue, yellow and flesh if the background is green).